package cn.sxt.common.test;


import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


public class BaseText {

	protected Logger logger = LogManager.getLogger();
	protected ApplicationContext ac ;
	
	@Before
	public void init(){
		ac = new ClassPathXmlApplicationContext("classpath*:spring/applicationContext_*.xml");
		logger.info("--初始化成功--ac:{}",ac);
	}
	
	@Test
	public void testSpring(){
		logger.info("------test-----");
	}
	
	@After
	public void close(){
		
		ClassPathXmlApplicationContext cpx = (ClassPathXmlApplicationContext)this.ac;
		cpx.close();
		logger.info("-------close-----");
		
	}

}
